#if !defined(__PRAY_BASE_CUSTOMUI_H)
#define __PRAY_BASE_CUSTOMUI_H

#if 0
#define PRAY_ROSARYVIEW_DEFAULT_POSITION		73
#define PRAY_ROSARYVIEW_FIRST					65
#define PRAY_ROSARYVIEW_SECOND					52
#define PRAY_ROSARYVIEW_THIRD					39
#define PRAY_ROSARYVIEW_FOURTH					26
#define PRAY_ROSARYVIEW_FIFTH					13
#define PRAY_ROSARYVIEW_TOTAL_NUMBER_OF_ROWS	74
#else
#define ROSARYVIEW_INDEX_DEFAULTPOSITION		74
#define ROSARYVIEW_INDEX_MYSTERY_FIRST			66
#define ROSARYVIEW_INDEX_MYSTERY_SECOND			53
#define ROSARYVIEW_INDEX_MYSTERY_THIRD			40
#define ROSARYVIEW_INDEX_MYSTERY_FOURTH			27
#define ROSARYVIEW_INDEX_MYSTERY_FIFTH			14
#define ROSARYVIEW_TOTAL_NUMBER_OF_ROWS			75
#endif

#define TABLEVIEW_IDENTIFIER_BALL				@"ball"
#define TABLEVIEW_IDENTIFIER_CHAIN				@"chain"
#define TABLEVIEW_IDENTIFIER_CROSS				@"cross"
#define TABLEVIEW_IDENTIFIER_MEDAL				@"medal"
#define TABLEVIEW_IDENTIFIER_BLANK				@"blank"

#define ROSARYVIEW_INDEX_BALL					0	// 성모송
#define ROSARYVIEW_INDEX_BIGBALL				5	// 신비
#define ROSARYVIEW_INDEX_CHAIN					1	// X
#define ROSARYVIEW_INDEX_CHAINTOBIGBALL			2	// 영광송 + 구원송
#define ROSARYVIEW_INDEX_CHAINTOSTART			6	// 영광송만
#define ROSARYVIEW_INDEX_CROSS					4	// 사도신경
#define ROSARYVIEW_INDEX_MEDAL					3	// 영광송 + 구원송

#define ROSARYVIEW_ROWHEIGHT_BALL				51.0f
#define ROSARYVIEW_ROWHEIGHT_CHAIN				37.0f
#define ROSARYVIEW_ROWHEIGHT_CROSS				129.0f
#define ROSARYVIEW_ROWHEIGHT_MEDAL				71.0f

#define ROSARYVIEW_IMG_POINTER					@"rosary_pointer.png"

@protocol RosaryViewControllerDelegate

- (void)positionChanged:(NSInteger)position withValue:(NSInteger)value;
- (void)rosaryMoving;

@optional
- (void)rosaryEnd;

@end

@interface ImageButton : UIButton
{
	
}

- (id)initWithFrame:(CGRect)frame andShowThisImageForNormalState:(UIImage*)normalImage thenShowThisWhenHighlighted:(UIImage*)hilightImage let:(id)target handleEventAt:(SEL)action;
- (void)setNormalImage:(UIImage*)image;
- (void)setHighlightedImage:(UIImage*)image;

@end

@interface RosaryViewController : UITableView <UIScrollViewDelegate, UITableViewDelegate, UITableViewDataSource, UIActionSheetDelegate>
{
	id<RosaryViewControllerDelegate>	_rosaryDelegate;
	BOOL								_blockScroll;
	
	CGPoint								_lastOffset;
	CGPoint								_startPoint;
	NSInteger							_numberOfTouch;
	NSInteger							_curRosaryPosition;
	
	UIImage*							_imgBall;
	UIImage*							_imgChain;
	UIImage*							_imgCross;
	UIImage*							_imgMedal;
}

@property (nonatomic, assign) id<RosaryViewControllerDelegate>		rosaryDelegate;

- (void)resetPosition;
- (void)changeRosary:(NSInteger)rosaryNum;
- (void)onSideChange:(BOOL)isLeftHand;
- (void)checkRosaryAction:(UIScrollView*)scrollView;
- (NSInteger)currentPosition;
- (NSInteger)currentRosaryValue;

@end

@interface LanguageInformation : NSObject 

+ (NSString*)getLanguageNameFromLanguageCode:(NSString*)code;
+ (NSString*)getLanguageCodeFromLanguageName:(NSString*)language;

@end

@class PrayViewController;

@interface MysteryView : UIView 

+ (MysteryView*)getMysteryViewForMystery:(NSInteger)mystery withIndex:(NSInteger)index rootViewController:(PrayViewController*)rootViewController;

@end

@interface MysteryString

+ (NSString*)getMysteryTitleForMystery:(NSInteger)mystery withIndex:(NSInteger)index;
+ (NSString*)getMysteryText1ForMystery:(NSInteger)mystery withIndex:(NSInteger)index;
+ (NSString*)getMysteryText2ForMystery:(NSInteger)mystery withIndex:(NSInteger)index;

@end

@interface CustomTextView : UITextView 

@end


#endif //!__PRAY_BASE_CUSTOMUI_H